<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require './api.class.php';


//$str='a:1:{s:5:"order";a:18:{s:3:"ref";s:16:"2016101714513849";s:12:"channel_code";s:2:"ec";s:13:"trade_pattern";s:2:"b1";s:10:"date_order";s:19:"2016-10-17 14:16:16";s:5:"buyer";s:17:"2973738594@qq.com";s:6:"seller";s:16:"532427264@qq.com";s:12:"receive_info";s:112:"黄翠连|17783067698|中国|重庆|重庆市|南岸区|重庆市南岸区学府大道33号交科院10栋|530200";s:18:"total_import_taxes";s:5:"8.810";s:14:"amount_untaxed";s:6:"69.000";s:12:"amount_total";s:6:"82.810";s:12:"delivery_fee";s:5:"5.000";s:12:"buyer_reg_no";s:17:"2973738594@qq.com";s:10:"buyer_name";s:9:"黄翠连";s:13:"buyer_id_type";s:1:"1";s:13:"buyer_id_card";s:18:"450121199101144524";s:10:"order_line";a:1:{i:0;a:7:{s:3:"sku";s:8:"P0042007";s:4:"name";s:48:"(保税)德国 Lavera 柠檬平衡洗发露200ml";s:5:"price";d:69;s:3:"num";i:1;s:7:"tax_fee";s:5:"8.806";s:9:"sub_total";s:6:"77.806";s:17:"sub_total_untaxed";d:69;}}s:12:"payment_line";a:1:{i:0;a:3:{s:15:"payment_account";s:6:"alipay";s:9:"payamount";d:82.810000000000002;s:10:"payment_no";s:14:"14766849855438";}}s:7:"ebpCode";s:10:"50089609A8";}}';
//var_export(unserialize($str));die;
member_add();

function member_add() {
   $member=array ( 'id' => '115201', 'name' => 'xi1a', 'phone' => null, 'mobile' => '15236987896', 'email' => '3166443848@qq.com', 'street' => NULL, 'city' => NULL, 'province' => '', 'country' => '', 'contact_address' => '', );
    
    $api = new api();
    $api->adddata("info_string", json_encode($member));
    $api->adddata("method", "Member.member_add");
    $res = $api->send();
    var_dump($res);
}
